package vip.xiaonuo.modular.enums;

import lombok.Getter;

/**
 * @Description
 * @Author cy
 * @Date 2022/8/5 14:37
 * @Version 1.0
 */
@Getter
public enum IndexAnalysisEnum {

    POP_ADAPTER("popAdapter", 7,"人口密度"),
    SERVICE_POP_ADAPTER("servicePopAdapter", 8,"实际服务人口"),
    POP_POINT_ADAPTER("popPointAdapter", 9,"人口重心"),
    POP_PURCHASING_POWER_ADAPTER("popPurchasingPower", 10,"人口购买力"),
    POP_LIVENESS_ADAPTER("popLivenessAdapter", 11,"人口活跃度"),
    TRIP_OD_ADAPTER("tripODAdapter", 12,"出行OD分析"),
    ROAD_NETWORK_ADAPTER("roadNetworkAdapter",13, "道路网密度"),
    //...
    ;

    private final String beanName;

    private final Integer typeId;

    private final String describe;

    IndexAnalysisEnum(String beanName, Integer typeId,String describe) {
        this.beanName = beanName;
        this.typeId = typeId;
        this.describe = describe;
    }

    /**
     * 返回指定枚举
     * @author: cy
     * @Date: 2022/8/5 14:43
     **/
    public static IndexAnalysisEnum getBeanName(Integer typeId){
        IndexAnalysisEnum result = null;
        for(IndexAnalysisEnum analysisEnum: IndexAnalysisEnum.values()){
            if(analysisEnum.getTypeId() == typeId){
                result = analysisEnum;
            }
        }
        return result;
    }
}
